package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;

/**
 * 网关启动类
 *
 * @author vains
 */
@SpringBootApplication
public class GatewayApplication {


    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(GatewayApplication.class, args);


        ConfigurableEnvironment environment = run.getEnvironment();

        String property = environment.getProperty("server.port");
        System.out.println(property);
    }

}
